package com.biovr.backend.repository;

import com.biovr.backend.domain.User;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created by monodev on 2017/5/2.
 */
@Repository
public interface UserRepository extends MongoRepository<User,String> {
    List<User> findByRoles(String ... roles);
    User findByUsername(String username);
    User findByUsernameAndPassword(String username,String password);
}